package com.kkb.kkbportal.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author ${author}
 * @since 2021-08-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "Score对象", description = "评价信息表")
public class Score implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评价主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "评价人id（用户表主键）", required = true)
    private Long masterId;

    @ApiModelProperty(value = "被评价人id（用户表主键）", required = true)
    private Long slaveId;

    @ApiModelProperty(value = "评价项目id（项目表主键）", required = true)
    private Long objectId;

    @ApiModelProperty(value = "评价内容")
    private String msg;

    @ApiModelProperty(value = "评价星级1（1~5）")
    private Integer starOne;

    @ApiModelProperty(value = "评价星级2（1~5）")
    private Integer starTwo;

    @ApiModelProperty(value = "评价星级3（1~5）")
    private Integer starThree;

    @ApiModelProperty(value = "评价类型：0：匿名评价 1：实名评价")
    private Boolean scoreIsReal;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "0:未删除 其它(id):已删除", hidden = true)
    @TableField(select = false, value = "is_deleted")
    @TableLogic(delval = "id")
    private Long deleted;

}
